# DON'T TOUCH THIS FILE
# БЛЯТЬ, НЕ ТРОГАЙ ФАЙЛ, Я НЕ ЕБУ КАК ОН РАБОТАЕТ
CC=g++

CCTARGET=build/Engine

CCSRC= \
main.cpp \
ame/source/*.cpp \
ame/source/render/*.cpp \
ame/source/objectClasses/*.cpp \
ame/source/modules/*.cpp \

CCLINKS=-lvulkan -pthread -lglfw 

CCFLAGS=$(CCSRC) -Iame/include -I. -o $(CCTARGET) $(CCLINKS) -std=c++17 -m64

all: prestage clean dirs engine
	@echo "[\e[92m100%\e[39m] - \e[1;34mCompiling ended!\e[0m"

dirs:
	@echo "[\e[92m33%\e[39m] - Create build dir"
	@mkdir build/

engine:
	@echo "[\e[92m66%\e[39m] - Compile source code $(CCSRC) -> $(CCTARGET)"
	@$(CC) $(CCFLAGS)

clean:
	@echo "[\e[92m0%\e[39m] - Delete $(CCTARGET)"
	@rm -rf $(CCTARGET)

	@if [ -d ./build ]; then echo '[\e[92m25%\e[39m] - Delete build dir'; rm -r build/; fi

prestage:
	@echo "[\e[92m. . .\e[39m] - \e[1;34mPrepare to compile...\e[0m"
